Parse, don’t validate
#関数型プログラミング
Parse, don’t validate
Parse don't validate - Elm Patterns
by Elm Pattern(Elm Pattern)
Zodの背景としている思想のひとつ。
Some other great aspects:
・ Zero dependencies
・Works in Node.js and all modern browsers
・Tiny: 8kb minified + zipped
・Immutable: methods (e.g. .optional()) return a new instance
・Concise, chainable interface
・Functional approach: parse, don't validate
・Works with plain JavaScript too! You don't need to use TypeScript.
https://github.com/colinhacks/zod#introduction
hr.icon
koma.icon『Domain Modeling Made Functional: Tackle Software Complexity with Domain-Driven Design and F#』もこのあたりの考え方が背景の一つにありそう